package com.micro.commonlibrary.Base;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.micro.commonlibrary.manage.ActivityManage;

import me.yokeyword.fragmentation.SupportActivity;

public abstract class BaseActivity extends SupportActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityManage.addActivity(this);
        setContentView(getView());
        initView();
        getData();
    }

    protected abstract int getView();

    protected abstract void initView();

    protected abstract void getData();


    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityManage.removeActivity(this);
    }
}
